<template>
    <div>
        <ETable   :columns="columns" :loadData="getdrugs"
        :isPage="true" :pageSize="[10, 20, 30]" ref="table">
        </ETable>
    </div>
</template>

<script setup lang="ts">

import { useRoute } from 'vue-router';
import { getdrugs} from '../../apis/medicalcare/MedicineLogs/MedicineLogs';
import ETable, { type ColumnType } from '../../components/ETable.vue';
import { reactive} from 'vue';



const route = useRoute();

console.log(route.params.id);

const id=Number(route.params.id)
console.log(id);

const getdata2=()=>{
  getdrugs(id).then((res:any)=>{
        console.log(res);
        
    })
}
getdata2()

const columns = reactive<ColumnType[]>([
  {
    prop: 'id',
    label: '序号',
    width: '',
  },
  {
    prop: 'elderlyName',
    label: '药品名称',
    width: '',
  },
  {
    prop: 'elderlyGender',
    label: '数量',
    width: '',
  },
  {
    prop: 'addAccountName',
    label: '有效期',
    width: '',
  },
  {
    prop: 'addTime',
    label: '剂量',
    width: '',
  },
  {
    prop: 'addTime',
    label: '服法',
    width: '',
  },
  {
    prop: 'operation',
    label: '操作',
    slot: true,
    width: '',
  },
])
</script>

<style scoped>

</style>